<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<table border="1">
		<thead>
			<tr>
				<td>序号</td><td>名字</td><td>工资</td><td>性别</td><td>生日</td><td>操作</td>
			</tr>
		</thead>
		<c:forEach items="${customers }" var="c" varStatus="status">
			<tr>
				<td>${status.index+1 }</td>
				<td><a href="hobby?cid=${c.id }">${c.cname }</a></td>
				<td><fmt:formatNumber pattern="$,##,###.00" value="${c.salary }"></fmt:formatNumber></td>
				<td>
					<c:if test="${c.sex }">男</c:if>
	 				<c:if test="${!c.sex }">女</c:if>
				</td>
				<td><fmt:formatDate value="${c.birthDate }" pattern="yyyy-MM-dd"/></td>
				<td><a href="delete?cid=${c.id }">删除</a>&nbsp;&nbsp;<a href="toupdate?cid=${c.id }">更新</a></td>
			</tr>
		</c:forEach>
	</table>
</body>
</html>